fix(analyzer): retain fenced SKILL.md findings#276
Open
rodboev wants to merge 1 commit into
Open
Conversation
Signed-off-by: Rod Boev <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The static runner now retains TM1 findings from fenced commands in canonical
SKILL.md. It keeps existing code-example filtering for ordinary Markdown, including non-canonical*skill.mdfilenames, and leaves the unchanged analyzer-local fenced-example bypasses disclosed as residual scope.Root cause
run_static_patterns()treatedSKILL.mdas non-executable Markdown, then dropped findings whose context contained triple backticks. The TM1 analyzer emitted the finding, but the runner removed it before reporting.Changes
_is_skill_md(path)helper at the three legacySKILL.mddoc-filter exemption sites, and added_is_canonical_skill_md(path)for the new exact-basename runner exemption.SKILL.md.SKILL.md, fencedguide.md, non-canonical*skill.mdpaths that must stay filtered, and the loose-vs-canonical path-helper boundary.tmp_path / "SKILL.md"and asserts TM1 plus nonzero before/after filtering counts.Scope
This implements only the fenced
SKILL.mdexample-filtering slice of issue #268. It doesn't changemeta_analyzer.py, scoring bands, report schema, analyzer registration, provider code, or other issue slices. The retained finding remains in the current LOW/SAFE aggregate band; this change surfaces and counts it without retuning scoring. Analyzer-local fenced-example bypasses still remain for TM4, EA2, E5, AR, and MP because those modules filter upstream of the runner.Verification
pytest tests/nodes/analyzers/test_static_runner_filtering.py tests/unit/test_cli.py -v, 58 passedpytest tests/unit/test_cli.py::test_cli_scan_no_llm_reports_fenced_skill_md_tool_misuse -q, 1 passedpytest -m "not integration and not provider" tests/ -q, 1321 passed, 12 skipped, 34 deselected, 6 xfaileduv run ruff check src/ tests/uv run ruff format --check src/ tests/git diff --checkBase reproduction:
issues: [],findings_before_filtering: 0, andfindings_after_filtering: 0.Head reproduction: the CLI regression asserts TM1 in
issuesand both filtering counts greater than zero.Upstream
Refs #268